package www.lagou.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * JavaBean类
 *      用来存储数据 成员变量私有 提供get set 提供空参  实现序列化接口
 *
 * Account 就是对应了 数据库Test_01中 TRANSACTION 表
 * id INT PRIMARY KEY AUTO_INCREMENT,
 * cardid VARCHAR(100) , -- 交易卡号
 * tratype VARCHAR(100) ,    -- 交易类型： 转入 或者 转出
 * tramoney DOUBLE  , -- 交易金额
 * tradate DATETIME  -- 交易日期
 */
public class Transaction implements Serializable {
    private static final long serialVersionUID = 8854932131731501094L;

    private int id;             // id
    private String cardid;      // 交易卡号
    private String tratype;     // 交易类型： 转入 或者 转出
    private double tramoney;    // 交易金额
    private Date tradate;     // 交易日期 // private String ctime;

    public Transaction() {
    }

    public Transaction(int id, String cardid, String tratype, double tramoney, Date tradate) {
        this.id = id;
        this.cardid = cardid;
        this.tratype = tratype;
        this.tramoney = tramoney;
        this.tradate = tradate;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCardid() {
        return cardid;
    }

    public void setCardid(String cardid) {
        this.cardid = cardid;
    }

    public String getTratype() {
        return tratype;
    }

    public void setTratype(String tratype) {
        this.tratype = tratype;
    }

    public double getTramoney() {
        return tramoney;
    }

    public void setTramoney(double tramoney) {
        this.tramoney = tramoney;
    }

    public Date getTradate() {
        return tradate;
    }

    public void setTradate(Date tradate) {
        this.tradate = tradate;
    }


    @Override
    public String toString() {
        return "Transaction{" +
                "id=" + id +
                ", cardid='" + cardid + '\'' +
                ", tratype='" + tratype + '\'' +
                ", tramoney=" + tramoney +
                ", tradate=" + tradate +
                '}';
    }
}
